3.257 \(\int \tan ^4(x) \sqrt{a+a \tan ^2(x)} \, dx\)

Optimal. Leaf size=54 \[ \frac{1}{4} \tan ^3(x) \sqrt{a \sec ^2(x)}-\frac{3}{8} \tan (x) \sqrt{a \sec ^2(x)}+\frac{3}{8} \cos (x) \sqrt{a \sec ^2(x)} \tanh ^{-1}(\sin (x)) \]

[Out]

(3*ArcTanh[Sin[x]]*Cos[x]*Sqrt[a*Sec[x]^2])/8 - (3*Sqrt[a*Sec[x]^2]*Tan[x])/8 + (Sqrt[a*Sec[x]^2]*Tan[x]^3)/4

________________________________________________________________________________________

Rubi [A]  time = 0.105229, antiderivative size = 54, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235, Rules used = {3657, 4125, 2611, 3770} \[ \frac{1}{4} \tan ^3(x) \sqrt{a \sec ^2(x)}-\frac{3}{8} \tan (x) \sqrt{a \sec ^2(x)}+\frac{3}{8} \cos (x) \sqrt{a \sec ^2(x)} \tanh ^{-1}(\sin (x)) \]

Antiderivative was successfully verified.

[In]

Int[Tan[x]^4*Sqrt[a + a*Tan[x]^2],x]

[Out]

(3*ArcTanh[Sin[x]]*Cos[x]*Sqrt[a*Sec[x]^2])/8 - (3*Sqrt[a*Sec[x]^2]*Tan[x])/8 + (Sqrt[a*Sec[x]^2]*Tan[x]^3)/4

Rule 3657

Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*sec[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a, b]

Rule 4125

Int[(u_.)*((b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sec[e + f*x], x]}, Di
st[((b*ff^n)^IntPart[p]*(b*Sec[e + f*x]^n)^FracPart[p])/(Sec[e + f*x]/ff)^(n*FracPart[p]), Int[ActivateTrig[u]
*(Sec[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \tan ^4(x) \sqrt{a+a \tan ^2(x)} \, dx &=\int \sqrt{a \sec ^2(x)} \tan ^4(x) \, dx\\ &=\left (\cos (x) \sqrt{a \sec ^2(x)}\right ) \int \sec (x) \tan ^4(x) \, dx\\ &=\frac{1}{4} \sqrt{a \sec ^2(x)} \tan ^3(x)-\frac{1}{4} \left (3 \cos (x) \sqrt{a \sec ^2(x)}\right ) \int \sec (x) \tan ^2(x) \, dx\\ &=-\frac{3}{8} \sqrt{a \sec ^2(x)} \tan (x)+\frac{1}{4} \sqrt{a \sec ^2(x)} \tan ^3(x)+\frac{1}{8} \left (3 \cos (x) \sqrt{a \sec ^2(x)}\right ) \int \sec (x) \, dx\\ &=\frac{3}{8} \tanh ^{-1}(\sin (x)) \cos (x) \sqrt{a \sec ^2(x)}-\frac{3}{8} \sqrt{a \sec ^2(x)} \tan (x)+\frac{1}{4} \sqrt{a \sec ^2(x)} \tan ^3(x)\\ \end{align*}

Mathematica [A]  time = 0.0757117, size = 32, normalized size = 0.59 \[ \frac{1}{8} \sqrt{a \sec ^2(x)} \left (2 \tan ^3(x)-3 \tan (x)+3 \cos (x) \tanh ^{-1}(\sin (x))\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[x]^4*Sqrt[a + a*Tan[x]^2],x]

[Out]

(Sqrt[a*Sec[x]^2]*(3*ArcTanh[Sin[x]]*Cos[x] - 3*Tan[x] + 2*Tan[x]^3))/8

________________________________________________________________________________________

Maple [A]  time = 0.052, size = 56, normalized size = 1. \begin{align*}{\frac{\tan \left ( x \right ) }{4\,a} \left ( a+a \left ( \tan \left ( x \right ) \right ) ^{2} \right ) ^{{\frac{3}{2}}}}-{\frac{5\,\tan \left ( x \right ) }{8}\sqrt{a+a \left ( \tan \left ( x \right ) \right ) ^{2}}}+{\frac{3}{8}\sqrt{a}\ln \left ( \sqrt{a}\tan \left ( x \right ) +\sqrt{a+a \left ( \tan \left ( x \right ) \right ) ^{2}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*tan(x)^2)^(1/2)*tan(x)^4,x)

[Out]

1/4*tan(x)*(a+a*tan(x)^2)^(3/2)/a-5/8*(a+a*tan(x)^2)^(1/2)*tan(x)+3/8*a^(1/2)*ln(a^(1/2)*tan(x)+(a+a*tan(x)^2)
^(1/2))

________________________________________________________________________________________

Maxima [B]  time = 2.84765, size = 1161, normalized size = 21.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(x)^2)^(1/2)*tan(x)^4,x, algorithm="maxima")

[Out]

-1/16*(4*(5*sin(7*x) - 3*sin(5*x) + 3*sin(3*x) - 5*sin(x))*cos(8*x) - 40*(2*sin(6*x) + 3*sin(4*x) + 2*sin(2*x)
)*cos(7*x) - 16*(3*sin(5*x) - 3*sin(3*x) + 5*sin(x))*cos(6*x) + 24*(3*sin(4*x) + 2*sin(2*x))*cos(5*x) + 24*(3*
sin(3*x) - 5*sin(x))*cos(4*x) - 3*(2*(4*cos(6*x) + 6*cos(4*x) + 4*cos(2*x) + 1)*cos(8*x) + cos(8*x)^2 + 8*(6*c
os(4*x) + 4*cos(2*x) + 1)*cos(6*x) + 16*cos(6*x)^2 + 12*(4*cos(2*x) + 1)*cos(4*x) + 36*cos(4*x)^2 + 16*cos(2*x
)^2 + 4*(2*sin(6*x) + 3*sin(4*x) + 2*sin(2*x))*sin(8*x) + sin(8*x)^2 + 16*(3*sin(4*x) + 2*sin(2*x))*sin(6*x) +
 16*sin(6*x)^2 + 36*sin(4*x)^2 + 48*sin(4*x)*sin(2*x) + 16*sin(2*x)^2 + 8*cos(2*x) + 1)*log(cos(x)^2 + sin(x)^
2 + 2*sin(x) + 1) + 3*(2*(4*cos(6*x) + 6*cos(4*x) + 4*cos(2*x) + 1)*cos(8*x) + cos(8*x)^2 + 8*(6*cos(4*x) + 4*
cos(2*x) + 1)*cos(6*x) + 16*cos(6*x)^2 + 12*(4*cos(2*x) + 1)*cos(4*x) + 36*cos(4*x)^2 + 16*cos(2*x)^2 + 4*(2*s
in(6*x) + 3*sin(4*x) + 2*sin(2*x))*sin(8*x) + sin(8*x)^2 + 16*(3*sin(4*x) + 2*sin(2*x))*sin(6*x) + 16*sin(6*x)
^2 + 36*sin(4*x)^2 + 48*sin(4*x)*sin(2*x) + 16*sin(2*x)^2 + 8*cos(2*x) + 1)*log(cos(x)^2 + sin(x)^2 - 2*sin(x)
 + 1) - 4*(5*cos(7*x) - 3*cos(5*x) + 3*cos(3*x) - 5*cos(x))*sin(8*x) + 20*(4*cos(6*x) + 6*cos(4*x) + 4*cos(2*x
) + 1)*sin(7*x) + 16*(3*cos(5*x) - 3*cos(3*x) + 5*cos(x))*sin(6*x) - 12*(6*cos(4*x) + 4*cos(2*x) + 1)*sin(5*x)
 - 24*(3*cos(3*x) - 5*cos(x))*sin(4*x) + 12*(4*cos(2*x) + 1)*sin(3*x) - 48*cos(3*x)*sin(2*x) + 80*cos(x)*sin(2
*x) - 80*cos(2*x)*sin(x) - 20*sin(x))*sqrt(a)/(2*(4*cos(6*x) + 6*cos(4*x) + 4*cos(2*x) + 1)*cos(8*x) + cos(8*x
)^2 + 8*(6*cos(4*x) + 4*cos(2*x) + 1)*cos(6*x) + 16*cos(6*x)^2 + 12*(4*cos(2*x) + 1)*cos(4*x) + 36*cos(4*x)^2
+ 16*cos(2*x)^2 + 4*(2*sin(6*x) + 3*sin(4*x) + 2*sin(2*x))*sin(8*x) + sin(8*x)^2 + 16*(3*sin(4*x) + 2*sin(2*x)
)*sin(6*x) + 16*sin(6*x)^2 + 36*sin(4*x)^2 + 48*sin(4*x)*sin(2*x) + 16*sin(2*x)^2 + 8*cos(2*x) + 1)

________________________________________________________________________________________

Fricas [A]  time = 1.48208, size = 171, normalized size = 3.17 \begin{align*} \frac{1}{8} \, \sqrt{a \tan \left (x\right )^{2} + a}{\left (2 \, \tan \left (x\right )^{3} - 3 \, \tan \left (x\right )\right )} + \frac{3}{16} \, \sqrt{a} \log \left (2 \, a \tan \left (x\right )^{2} + 2 \, \sqrt{a \tan \left (x\right )^{2} + a} \sqrt{a} \tan \left (x\right ) + a\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(x)^2)^(1/2)*tan(x)^4,x, algorithm="fricas")

[Out]

1/8*sqrt(a*tan(x)^2 + a)*(2*tan(x)^3 - 3*tan(x)) + 3/16*sqrt(a)*log(2*a*tan(x)^2 + 2*sqrt(a*tan(x)^2 + a)*sqrt
(a)*tan(x) + a)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a \left (\tan ^{2}{\left (x \right )} + 1\right )} \tan ^{4}{\left (x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(x)**2)**(1/2)*tan(x)**4,x)

[Out]

Integral(sqrt(a*(tan(x)**2 + 1))*tan(x)**4, x)

________________________________________________________________________________________

Giac [A]  time = 1.14118, size = 65, normalized size = 1.2 \begin{align*} \frac{1}{8} \, \sqrt{a \tan \left (x\right )^{2} + a}{\left (2 \, \tan \left (x\right )^{2} - 3\right )} \tan \left (x\right ) - \frac{3}{8} \, \sqrt{a} \log \left ({\left | -\sqrt{a} \tan \left (x\right ) + \sqrt{a \tan \left (x\right )^{2} + a} \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*tan(x)^2)^(1/2)*tan(x)^4,x, algorithm="giac")

[Out]

1/8*sqrt(a*tan(x)^2 + a)*(2*tan(x)^2 - 3)*tan(x) - 3/8*sqrt(a)*log(abs(-sqrt(a)*tan(x) + sqrt(a*tan(x)^2 + a))
)